package com.ad.pet.app.main.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.ad.pet.R;
import com.ad.pet.common.data.utils.glide.GlideUtil;
import com.ad.pet.models.remote.home.Cate;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * Created by SEELE on 2018/3/26.
 */

    public class MainMenuAdapter extends BaseQuickAdapter<Cate, BaseViewHolder> {

        public MainMenuAdapter( @Nullable List<Cate> data) {
            super(R.layout.item_home_menu, data);
        }

        @Override
        protected void convert(final BaseViewHolder helper, final Cate item) {
            helper.setText(R.id.tv_label, item.getNav_title());
            ImageView imageView = helper.getView(R.id.iv_icon);
            GlideUtil.load(mContext, item.getNav_pic(), imageView);

        }
    }


